<template>
  <div v-show="bbox.isActive">
    <PanelButton name="删除 BBox" @click="bbox.deleteBbox"/>
    <PanelToggle name="自动选择颜色" v-model="bbox.color.auto"/>
    <PanelToggle
        v-show="bbox.color.auto"
        name="只有黑色或白色"
        v-model="bbox.color.blackOrWhite"
    />
    <PanelInputString
        name="描边颜色"
        v-model="bbox.polygon.pathOptions.strokeColor"
    />
  </div>
</template>

<script>
import PanelButton from "@/components/PanelButton";
import PanelToggle from "@/components/PanelToggle";
import PanelInputString from "@/components/PanelInputString";

export default {
  name: "BBoxPanel",
  components: {PanelButton, PanelToggle, PanelInputString},
  props: {
    bbox: {
      type: Object,
      required: true
    }
  }
};
</script>
